#include"stu_bsk头.h"

int read()
{
	struct diepian di;

	FILE* pa;
	int i, k;

	if (_access("D:\\bsk_1.txt", 0) == -1)
	{
		pa = fopen("D:\\bsk_1.txt", "w");
		fwrite(&k, sizeof(int), 1, pa);
		fclose(pa);
	}
	pa = fopen("D:\\bsk_1.txt", "r");
	fread(&k, sizeof(int), 1, pa);
	 = k;
	for (i = 0; i < k; i++)
	{
		fread(&k, sizeof(struct diepian), 1, pa);
		strcpy_s(da.di[i].name, di.name);
		strcpy_s(da.di[i].nation, di.nation);
		strcpy_s(da.di[i].type, di.type);
		strcpy_s(da.di[i].n, di.n);
	}
	fclose(pa);
	return 0;
}